import 'package:flu_framework/common/base/BaseWidget.dart';
import 'package:flu_framework/common/utility/config.dart';
import 'package:flu_framework/common/widgets/dialog_utils.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:umeng_common_sdk/umeng_common_sdk.dart';

import '../../../get_pages.dart';

class HomePage extends BaseWidget {
  const HomePage({super.key});

  @override
  BaseWidgetState<BaseWidget> getState() => _HomePageState();
}

class _HomePageState extends BaseWidgetState<HomePage> {

  @override
  String setPageTitle() => "首页";

  @override
  Widget buildContent() {
    return ListView(
      children: [
        ListTile(
          title: Text("上下拉加载"),
          onTap: (){
            Get.toNamed(PageName.PAGE_REFRESH2);
          },
        ),
        ListTile(
          title: Text("定位功能"),
          onTap: (){
            Get.toNamed(PageName.PAGE_LOCATION);
          },
        ),
        ListTile(
          title: Text("支付功能"),
          onTap: (){
            Get.toNamed(PageName.PAGE_PAY);
          },
        ),
        ListTile(
          title: Text("图片选择"),
          onTap: (){
            Get.toNamed(PageName.PAGE_IMAGE_PICKER);
          },
        ),
        ListTile(
          title: Text("视频播放"),
          onTap: (){
            Map<String,dynamic> param = Map();
            param["title"]= "视频title";
            param["videoUrl"]='';
            Get.toNamed(PageName.PAGE_VIDEO_PLAYER,arguments: param);
          },
        ),
        ListTile(
          title: Text("内购"),
          onTap: () {
            Map<String, dynamic> param = Map();
            param["title"] = "内购title";
            param["videoUrl"] = '';
            Get.toNamed(PageName.PAGE_IN_PAY, arguments: param);
          }
        ),
        ListTile(
          title: Text("友盟页面"),
          onTap: () {
            Get.toNamed(PageName.PAGE_UMENG);
          },
        ),
        ListTile(
          title: Text("遮罩"),
          onTap: (){
            Get.toNamed(PageName.PAGE_OVERLAY);
          },
        ),
        ListTile(
          title: Text('一键登录'),
          onTap: (){
            Get.toNamed(PageName.PAGE_JGVERIFY);
          },
        ),
        ListTile(
          title: Text('自定义按钮'),
          onTap: (){
            Get.toNamed(PageName.PAGE_USEBTN);
          },
        ),
      ],
    );
  }



}
